﻿<!DOCTYPE html>
<html lang="en-us" id="extr-page">
<head>
    <meta charset=" utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <title>登录</title>
    <meta name="description" content="">
    <meta name="author" content="">

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">


    <!-- #CSS Links -->
    <!-- Basic Styles -->
    <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" media="screen" href="css/font-awesome.css">

    <!-- SmartAdmin Styles : Caution! DO NOT change the order -->
    <link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-production-plugins.css">
    <link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-production.css">
    <link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-skins.css">

    <!-- SmartAdmin RTL Support -->
    <link rel="stylesheet" type="text/css" media="screen" href="css/smartadmin-rtl.css">

    <!-- Demo purpose only: goes with demo.js, you can delete this css when designing your own WebApp -->
    <link rel="stylesheet" type="text/css" media="screen" href="css/demo.css">

    <!-- #FAVICONS -->
    <link rel="shortcut icon" href="img/favicon/favicon.ico" type="image/x-icon">
    <link rel="icon" href="img/favicon/favicon.ico" type="image/x-icon">

    <!-- #GOOGLE FONT -->
    <link rel="stylesheet" href="css/open-sans.css" type="text/css">


    <!-- iOS web-app metas : hides Safari UI Components and Changes Status Bar Appearance -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">

    <!-- Startup image for web apps -->
    <link rel="apple-touch-startup-image" href="img/splash/ipad-landscape.png"
        media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)">
    <link rel="apple-touch-startup-image" href="img/splash/ipad-portrait.png"
        media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)">
    <link rel="apple-touch-startup-image" href="img/splash/iphone.png" media="screen and (max-device-width: 320px)">
</head>

<body class="animated fadeInDown">
    <!-- possible classes: minified, no-right-panel, fixed-ribbon, fixed-header, fixed-width-->

    <div id="main" role="main">

        <!-- MAIN CONTENT -->
        <div id="content" class="container">

            <div class="row">
                <div class="" style="margin: 100px auto !important; width: 400px;">
                    <div class="well no-padding">
                        <form action="" class="smart-form" id="loginform">
                            <header>
                                登录
                            </header>
                            <fieldset>
                                <section>
                                    <label class="label">账号</label>
                                    <label class="input">
                                        <i class="icon-append fa fa-user"></i>
                                        <input type="text" name="Account">
                                        <b class="tooltip tooltip-top-right"><i class="fa fa-user txt-color-teal"></i>
                                            请输入账号</b></label>
                                </section>

                                <section>
                                    <label class="label">密码</label>
                                    <label class="input">
                                        <i class="icon-append fa fa-lock"></i>
                                        <input type="password" name="Password">
                                        <b class="tooltip tooltip-top-right"><i class="fa fa-lock txt-color-teal"></i>输入您的密码</b>
                                    </label>
                                </section>
                            </fieldset>
                            <footer>
                                <input type="hidden" value="SYS" name="sys:sno" />
                                <input type="hidden" value="Login" name="sys:act" />
                                <button type="submit" id="btn_login" class="btn btn-primary">
                                    登录
                                </button>
                            </footer>
                        </form>
                    </div>

                </div>
            </div>
        </div>

    </div>
    <!-- END #MAIN CONTENT -->

    <!--================================================== -->

    <!-- PACE LOADER - turn this on if you want ajax loading to show (caution: uses lots of memory on iDevices)
<script data-pace-options='{ "restartOnRequestAfter": true }' src="js/plugin/pace/pace.min.js"></script>-->


    <!-- #PLUGINS -->
    <!-- Link to Google CDN's jQuery + jQueryUI; fall back to local -->
    <script type="text/javascript" async="" src="http://www.google-analytics.com/ga.js"></script>

    <script src="js/libs/jquery-2.1.1.min.js"></script>
    <script src="js/libs/jquery-ui-1.10.3.min.js"></script>
    <!-- BOOTSTRAP JS -->
    <script src="js/bootstrap/bootstrap.min.js"></script>

    <!-- IMPORTANT: APP CONFIG -->
    <script src="js/app.config.js"></script>


    <!-- CUSTOM NOTIFICATION -->
    <script src="js/notification/SmartNotification.min.js"></script>

    <!-- JARVIS WIDGETS -->
    <script src="js/smartwidgets/jarvis.widget.min.js"></script>


    <!-- SPARKLINES -->
    <script src="js/plugin/sparkline/jquery.sparkline.min.js"></script>

    <!-- JQUERY MASKED INPUT -->
    <script src="js/plugin/masked-input/jquery.maskedinput.min.js"></script>


    <!-- JQUERY UI + Bootstrap Slider -->
    <script src="js/plugin/bootstrap-slider/bootstrap-slider.min.js"></script>
    <script src="appjs/Helper.js"></script>
    <script src="appjs/Common.js"></script>
    <!--[if IE 8]>
<h1>Your browser is out of date, please update your browser by going to www.microsoft.com/download</h1>
<![endif]-->

    <!-- Demo purpose only
<script src="js/demo.min.js"></script>
-->
    <!-- MAIN APP JS FILE -->
    <script src="js/app.min.js"></script>
    <script src="appjs/Helper.js"></script>
    <script>
        var url = GetQueryString("url");
        $(function () {
            $("#loginform").submit(function () {
                $.ajax({
                    url: "../Api.ashx",
                    data: $(this).serialize(),
                    type: "Post",
                    dataType: "json",
                    success: function (data) {
                        if (data.IsSccuess) {
                            alert("登陆成功");
                            if (url != "" || url != undefined) {
                                window.location.href = url;
                            } else {
                                window.location.href = "DataTableManagement.html";
                            }

                        } else {
                            $("btn_login").html("登录");
                            alert(data.Message);
                        }
                    },
                    beforeSend: function () {
                        $("btn_login").html("登录中...");
                    }
                });
                return false;
            });
        });
    </script>
</body>
</html>
